<?php
namespace app\common\model;

use think\Model;
use think\Db;
class Curseware extends Model
{
    // 指定表名,不含前缀
    protected $name = 'curseware';

    /**
     * @param array $arg ['id'=>1,'name'=>'张三']
     * @param null $field
     * @return array
     */
    public function getListByArg(array $arg,$field='*')
    {
         if(!is_array($arg))return false;
        $arg = $this->where($arg)->field($field)->select();
        return $arg;
    }
}
